<%--
    Document   : MetricsCalculation
    Created on : Jun 16, 2011, 9:22:02 PM
    Author     : Tin Huynh
--%>
<%@page import="java.util.Map"%>
<%@page import="java.util.Iterator"%>
<%@page import="java.util.Set"%>
<%@page import="java.util.HashMap"%>
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
   "http://www.w3.org/TR/html4/loose.dtd">
<%
    String resultMessage = (String) request.getAttribute("resultMessage");
    HashMap distanceWithConfNetworkHashMap = (HashMap) request.getAttribute("distanceWithConfNetworkHashMap");
%>
<html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <title>Metrics Calculation</title>
</head>
<body>
    <h1><font><center>Metrics Calculation</center></font></h1>
    <%  if ((resultMessage != null) && (!resultMessage.equals(""))) {
    %>
    <font color="red"><%=resultMessage%></font><br>
    <%
    }
    %>
    <a href="./GoIndexPageServlet">Home</a>&nbsp;&nbsp;&nbsp;
    <a href="./GoBibliographyDBBuildingServlet">Build & Enrich CS Publications Bibliography DB</a>&nbsp;&nbsp;&nbsp;
    <a href="./GoCoAuthorGraphBuildingServlet">Build Co-Author Network</a>&nbsp;&nbsp;&nbsp;
    <a href="./GoProgramCommiteeNetworkBuildingServlet">Build CoAuthor NetWork for Program-Committee</a>&nbsp;&nbsp;&nbsp;
    <hr width="100%" size=10 color="blue">
    <a href="./CalculateTotalConferenceServlet">Metric #1: Total of papers in conferences</a><br>
    <a href="./CalculateTotalConferencePercentageServlet">Metric #2: Percent of papers in conferences</a><br>
    <a href="./CalculateTotalConfPercentWithCoAuthorServlet">Metric #3: Total Conf percentage with co-authored</a><br>
    <a href="./CalculateNetworkDistanceServlet">Metric #4: Network distances with the program committee network</a><br>
    <a href="#">...</a><br>
    <br>
    <b>Metric #4: Network distances with the program committee network</b>
    <table bordercolor="blue" border="1" width="100%">
    <tr bgcolor="#EBEBEB">
        <td width="5%"><b>No.</b></td>
        <td width="50%"><b>Conference name</b></td>
        <td width="45%"><b>Network Distance (Number of the Overlapped Node_Names)</b></td>
    </tr>
    <%
    if (distanceWithConfNetworkHashMap != null && distanceWithConfNetworkHashMap.size() > 0) {
        Set distanceWithConfNetworkSet = distanceWithConfNetworkHashMap.entrySet();
        Iterator confIter = distanceWithConfNetworkSet.iterator();
        int order = 1;
        while(confIter.hasNext()){
            Map.Entry distanceWithConfNetworkMapEntry = (Map.Entry)confIter.next();
    %>
        <tr>
            <td><%=order%></td>
            <td><%=distanceWithConfNetworkMapEntry.getKey()%></td>
            <td><%=distanceWithConfNetworkMapEntry.getValue()%></td>
        </tr>
    <%
            order++;
        }
    }
    %>

    </table>
</body>
</html>
